<form class="form-horizontal" role="form" method="post" action="<?=site_url('code/addstorage/'.$product_id) ?>">
  <div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">Choose size</label>
    <div class="col-sm-10">
      <div class="btn-group">	    
	  	<select class="form-control" name="filter" onchange="this.form.submit()">
		  <option value="all">--Choose size--</option>
		  <option value="xs" <?=(isset($filterSelected) && ($filterSelected == 'xs')) ? 'selected="selected"' : '' ?>>xs</option>		  
		  <option value="s" <?=(isset($filterSelected) && ($filterSelected == 's')) ? 'selected="selected"' : '' ?>>s</option>		  
		  <option value="m" <?=(isset($filterSelected) && ($filterSelected == 'm')) ? 'selected="selected"' : '' ?>>m</option>		  
		  <option value="l" <?=(isset($filterSelected) && ($filterSelected == 'l')) ? 'selected="selected"' : '' ?>>l</option>		  
		  <option value="xl" <?=(isset($filterSelected) && ($filterSelected == 'xl')) ? 'selected="selected"' : '' ?>>xl</option>		  
		  <option value="xxl" <?=(isset($filterSelected) && ($filterSelected == 'xxl')) ? 'selected="selected"' : '' ?>>xxl</option>		  
		  <option value="xxxl" <?=(isset($filterSelected) && ($filterSelected == 'xxxl')) ? 'selected="selected"' : '' ?>>xxxl</option>		  
		</select>
	  </div>
    </div>
  </div>
  <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Code</label>
    <div class="col-sm-10">
      <input class="form-control" name="code" id="disabledInput" type="text" placeholder="Disabled input here..." value="<?=isset($code) ? $code : "" ?>">
      <!-- <input type="text" name="xs_quantity" class="form-control" placeholder="#Quantity"> -->
    </div>    
  </div>  
  <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Quantity</label>
    <div class="col-sm-10">
      <input class="form-control" name="quantity" id="disabledInput" type="text" placeholder="Disabled input here..." value="<?=isset($quantity) ? $quantity : "" ?>">
      <!-- <input type="text" name="xs_quantity" class="form-control" placeholder="#Quantity"> -->
    </div>    
  </div> 
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
    	<?php foreach($shelves as $shelve): ?>
        <label class="checkbox-inline">
		  <input type="checkbox" name="shelve[]" id="inlineCheckbox1" value="<?=$shelve['id'] ?>"><?=$shelve['title'] ?><span class="badge"><?=$shelve['left_quantity'] ?></span>
		</label>		
		<?php endforeach; ?>
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
       <button type="submit" name="addStorageBtn" value="<?=$product_id; ?>" class="btn btn-primary">Add Storage</button>
       <!-- <button type="submit" name="backBtn" value="back" class="btn btn-success">Back to previous page</button> -->
    </div>
  </div>
</form>
